<?php
/* SVN FILE: $Id: player_types_controller.php 250 2010-06-17 10:55:41Z gregory.rome $ */
/**
 * PlayerTypes Controller.
 *
 * Player types.
 *
 * cBBweb : Digital Blood Bowl league interface (http://code.google.com/p/cbbweb/)
 * Copyright 2009-2010, Grégory Romé.
 *
 * Licensed under The MIT License
 * Redistributions of files must retain the above copyright notice.
 *
 * @filesource
 * @copyright     Copyright 2009-2010, Grégory Romé.
 * @link          http://code.google.com/p/cbbweb/ cBBweb Project
 * @package       cbbweb
 * @subpackage    cbbweb.controllers
 * @version       $Revision: 250 $
 * @modifiedby    $LastChangedBy: gregory.rome $
 * @lastmodified  $Date: 2010-06-17 10:55:41 +0000 (Thu, 17 Jun 2010) $
 * @license       http://www.opensource.org/licenses/mit-license.php The MIT License
 */

/**
 * PlayerTypes Controller.
 *
 * @package       cbbweb
 * @subpackage    cbbweb.controllers
 */
class PlayerTypesController extends AppController {

	var $name = 'PlayerTypes';
	var $helpers = array('Html', 'Form');

	function index() {
		$this->PlayerType->recursive = 0;
		$this->set('playerTypes', $this->paginate());
	}

	function view($id = null) {
		if (!$id) {
			$this->Session->setFlash(__('Invalid PlayerType.', true));
			$this->redirect(array('action'=>'index'));
		}
		$this->set('playerType', $this->PlayerType->read(null, $id));
	}

}
?>
